﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace File.Api.Models
{
    public class QCOrderVersionModel
    {
        public string OrderId { get; set; }

        public string CheckUserName { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public int Versions { get; set; }

        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 送检数量
        /// </summary>
        public decimal Qty { get; set; }

        /// <summary>
        /// 接受数量
        /// </summary>
        public decimal AccQty { get; set; }

        /// <summary>
        /// 不良数量
        /// </summary>
        public decimal BadQty { get; set; }

        /// <summary>
        /// 已检数量
        /// </summary>
        public decimal QcedQty { get; set; }

        /// <summary>
        /// 抽检数量
        /// </summary>
        public decimal RandomQty { get; set; }

        /// <summary>
        /// 不良率
        /// </summary>
        public decimal BadRate { get; set; }

        /// <summary>
        /// 指定检验中心
        /// </summary>
        public string AppointWorkstageId { get; set; }

        public string AppointWorkstageCode { get; set; }

        public string AppointWorkstageName { get; set; }

        /// <summary>
        /// 检验模板
        /// </summary>
        public string SamplingSchemeId { get; set; }

        public string SamplingSchemeCode { get; set; }

        public string SamplingSchemeName { get; set; }

        public int SamplingSchemeVersion { get; set; }

        public int SamplingSchemeLevel { get; set; }

        /// <summary>
        /// 库存检验批次
        /// </summary>
        public string InspectionBatchId { get; set; }

        /// <summary>
        /// 使用决策
        /// </summary>
        public int DecisionPolicy { get; set; }

        /// <summary>
        /// 检验开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }

        /// <summary>
        /// 检验完成时间
        /// </summary>
        public DateTime? EndTime { get; set; }

        /// <summary>
        /// 检验方式：全检，抽检，免检
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 检验标准
        /// </summary>
        public string Standard { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 执行状态：正常,未满单,暂存,冻结
        /// </summary>
        public int ExeStatus { get; set; }

        /// <summary>
        /// 已入库数量
        /// </summary>
        public decimal StockedQty { get; set; }

        /// <summary>
        /// 是否特采
        /// </summary>
        public bool IsAcceptDeviation { get; set; }

        /// <summary>
        /// 特采原因
        /// </summary>
        public string AcceptReason { get; set; }

        /// <summary>
        /// 特采人员
        /// </summary>
        public string AcceptUserId { get; set; }

        /// <summary>
        /// 抽样等级
        /// </summary>
        public int SamplingLevel { get; set; }

        /// <summary>
        /// 保存年限
        /// </summary>
        public int ShelfLife { get; set; }

        /// <summary>
        /// 表单编号
        /// </summary>
        public string TableCode { get; set; }

        public List<QCOrderCategoryDefectModel> SamplingSchemeDefects { get; set; } = new List<QCOrderCategoryDefectModel>();

        public List<QCOrderItemModel> QCOrderItemModels { get; set; } = new List<QCOrderItemModel>();
    }
}
